﻿<UserControl x:Class="Tum.PDE.LanguageDSL.Visualization.View.ViewExternLibraryControl"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             mc:Ignorable="d" 
             d:DesignHeight="300" d:DesignWidth="558" 
             TextOptions.TextFormattingMode="Display"
             xmlns:ctrl="clr-namespace:Tum.PDE.LanguageDSL.Visualization.View.Controls">

    <UserControl.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>

                <!-- Domain model style -->
                <ResourceDictionary Source="../Resources/Styles/DomainModelTreeStyle.xaml"/>

                <!-- Diagram model style -->
                <ResourceDictionary Source="../Resources/Styles/DiagramModelTreeStyle.xaml"/>

                <!-- Serialization model style + templates -->
                <ResourceDictionary Source="../Resources/Styles/SerializationModelTreeViewStyle.xaml"/>

            </ResourceDictionary.MergedDictionaries>
        </ResourceDictionary>
    </UserControl.Resources>

    <Grid DataContext="{Binding Path=ModelTreeViewModel, Mode=OneWay}">
        <ItemsControl Margin="0, 0, 0, 0"
                          ItemsSource="{Binding Path=RootNodes, Mode=OneWay}" 
                          ItemTemplate="{StaticResource RootElementsTemplate}"
                          Style="{StaticResource RootItemsControl}">
        </ItemsControl>
    </Grid>
</UserControl>
